package com.candy.bean;

public class Student {
//    属性
    private String stuName;
    private int stuAge;

//    构造方法
//    （idea中可以使用快捷键alt+insert可以自动生成构造方法）

//无参构造
    public Student() {
        System.out.println("调用了无参构造函数");
    }

//全参构造
    public Student(String stuName, int stuAge) {
        this.stuName = stuName;
        this.stuAge = stuAge;
        System.out.println("调用了全参构造");
    }

    //方法
    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }
}
